package cj.web.marriageSC.controllers;

import java.io.IOException;
import java.util.UUID;
import net.paoding.rose.web.annotation.Param;
import net.paoding.rose.web.annotation.Path;
import net.paoding.rose.web.annotation.rest.Get;
import net.paoding.rose.web.var.Model;
import net.sf.json.JSONObject;
import org.apache.http.client.ClientProtocolException;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import cj.web.marriageSC.dao.SCCartDAO;
import cj.web.marriageSC.domain.SCCart;

@Path("/sCCart")
public class SCCartController{

	private static Logger logger = Logger.getLogger(SCCartController.class.getName());
	
	@Autowired
	private SCCartDAO sCCartDao;

	@Get("query")
	public String query(Model model,SCCart sCCart)
	{
		sCCartDao.query(sCCart);
		return null;
	}
	
	@Get("queryById")
	public String queryById(Model model,@Param("id") String id)
	{
		sCCartDao.queryById(id);
		return null;
	}
	
	@Get("create")
	public String create(Model model,SCCart sCCart)
	{
		sCCartDao.create(sCCart);
		return null;
	}
	
	@Get("update")
	public String update(Model model,SCCart sCCart)
	{
		sCCartDao.update(sCCart);
		return null;
	}
	
	@Get("deleteById")
	public String deleteById(Model model,@Param("id") String id)
	{
		sCCartDao.deleteById(id);
		return null;
	}
}
